/*** 
 * @Author: wq
 * @Date: 2021-07-20 22:07:16
 * @LastEditTime: 2021-07-21 00:16:02
 * @LastEditors: wq
 * @Description: 
 * @FilePath: /opencv_camera/code/WinInfo/src/windowInfo.h
 * @CSDN： https://blog.csdn.net/u011218356 
 * @Git:  https://github.com/WQuit 
 * @Email:  779508400@qq.com  
 * @    星河灿烂，你是人间烟火
 */

#ifndef _WindowInfo_H_
#define _WindowInfo_H_

#include <X11/Xlib.h>
#include <list>
#include <string>

struct windowAttributeInfo
{
    /* data */
    std::string name;
    Window id;
    Window parentWindowID;
    int x;
    int y;
    int width;
    int height;
};


class WindowInfo
{
private:
    /* data */
    std::list<windowAttributeInfo> _windowList;
    void subWindowList(Display* display, Window id);
    void windowList();
public:
    WindowInfo(/* args */);
    ~WindowInfo();
    static WindowInfo* instance();
    void showWindowInfo();
    std::list<windowAttributeInfo> getWindowInfo();
};

#endif